[US-13.3 / OBT-244] Platform Overview: count pending change requests - #32
Open
Conversation
The Platform Overview "Pending Requests" stat counted only pending access requests. Add pending change requests (project/language create & edit) so the card reflects everything awaiting admin review, matching its "aggregate counts" framing. Both request fetches degrade gracefully so a failure in one still renders the dashboard with what loaded.
Co-Authored-By: Claude Opus 4.8 (1M context) <[email protected]>
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Organization UI Review profile: QUIET Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
[US-13.3 / OBT-244] Platform Overview: count pending change requests in the "Pending Requests" stat
Summary
The dashboard's Platform Overview "Pending Requests" stat counted only pending access requests. Change requests —
create_project,create_language,edit_language(Area 13) — also await admin review but were invisible in the count. This makes the stat sum pending access requests + pending change requests, matching the card's own "Aggregate counts across the entire platform" framing. Both request fetches degrade gracefully, so a failure in one still renders the dashboard with what loaded.Changes
1. Count both request types —
src/components/pages/dashboard/AdminDashboard.tsxchangeRequestsAPI.list({ status: "pending" })(no new endpoint).AdminDatagainspendingChangeRequests: ChangeRequestResponse[].StatCardvalue andhighlightnow usetotalPending = pendingRequests.length + pendingChangeRequests.length..catch(() => ({ data: [] })), so one failing endpoint no longer drops the whole dashboard — the overview renders and counts what it could load (stats are non-critical).The existing "Pending Access Requests" detail panel is unchanged: it still lists access requests only (reviewed on the Users page); change requests are reviewed on the Projects/Languages pages.
Type of Change
Testing
npm run typecheck(tsc -b) — passnpm run lint(eslint .) — 0 errorsnpm run build(vite build) — pass